package com.design.abstractfactory.audi;

import com.design.abstractfactory.CarFactory;
import com.design.abstractfactory.MiniCar;
import com.design.abstractfactory.SUVcar;

/**
 * 奥迪-生产工厂实现类
 */
public class AudiCarFactory implements CarFactory {
    @Override
    public MiniCar produceMiniCar() {
        return new AudiMinicar();
    }

    @Override
    public SUVcar produceSUVCar() {
        return new AudiSUVcar();
    }
}

/**
 * 奥迪迷你汽车类
 */
class AudiMinicar implements MiniCar {
    @Override
    public void show() {
        System.out.println("这是奥迪迷你汽车");
    }
}


/**
 * 奥迪迷你汽车类
 */
class AudiSUVcar implements SUVcar {
    @Override
    public void show() {
        System.out.println("这是奥迪SUV汽车");
    }
}